package com.geek.ch02;

import java.util.Scanner;

/**
 * @author chenmin
 * @desc TODO
 * 打印输出
 * 		A
 * 	   BBB
 * 	  CCCCC
 * 	 DDDDDDD
 * 	EEEEEEEEE
 *
 * @date 2025/9/2
 */
public class ForDemo3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入行数:");
        int n = sc.nextInt();
        char a='A';

        for (int i = 1; i <=n; i++) {
            for (int j = 1; j <= n-i; j++) {
                System.out.print(" ");
            }
            for (int k = 1; k <= 2*i-1; k++) {
                System.out.print(a);
            }
            System.out.println();
            a++;
        }
    }
}
